package com.kai.steering;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

// 示例：HandlerInterceptor
public class MyInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
        // 在这里添加调试逻辑，比如打印请求信息
        System.out.println("URL: " + request.getRequestURL());
        System.out.println("Method: " + request.getMethod());
        // ...
        return true; // 如果返回false，则请求将不会被处理
    }
}


